/*
 * @Descripttion: 
 * @version: 
 * @Author: 奇辰科技
 * @Date: 2021-11-20 13:10:58
 * @LastEditors: lokei
 * @LastEditTime: 2021-11-20 13:10:58
 */
package cn.lokei.gateway;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import cn.lokei.gateway.entity.MqttBroker;
import cn.lokei.gateway.entity.Server;
import cn.lokei.gateway.entity.WSServer;

class ChThread extends Thread {
	private Server server;

	public ChThread(Server server) {
		this.server = server;
	}

	public void run() {
		server.startup();
	}
}

@SpringBootApplication
public class GatewayApplication {

	public static void main(String[] args) throws InterruptedException {
		SpringApplication.run(GatewayApplication.class, args);
		MqttBroker mqttBroker = new MqttBroker();
		ChThread mqtt_t = new ChThread(mqttBroker);
		mqtt_t.start();

		WSServer wSServer = new WSServer();
		ChThread ws_t = new ChThread(wSServer);
		ws_t.start();
	}

}
